home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / lord2b7.zip / CASTLE2.REF < prev    next >
Text File  |  1997-05-26  |  8KB  |  427 lines

  1. ;note to .ref masters:
  2. ;replace castle2 with something else to use this .ref for other dwellings
  3. ;this .ref uses no long term vars, instead it makes its own data file - this
  4. ;means upgrading the game will not make people 'lose ownership' of their
  5. ;stuff.
  6.  
  7. @#STABLES
  8. ;lets them warp to a view places
  9. @offmap
  10. @do moveback
  11. @show
  12. `r0`c  `r1  The Stables `r0
  13.  
  14.   `0"Greetings, s&sir!  Where can we drop you off today?" `2a smartly dressed
  15.   youth asks.
  16.  
  17. @do `v01 is 1
  18. @do write
  19. `x`x
  20. @choice
  21. Sosen Village
  22. Stonepass Lodge
  23. Portown
  24. I'll stay here, thanks
  25. @if response not 4 then do
  26.   @begin
  27. @show
  28. `\`\  `0"We shall leave at once!" he shouts importantly.
  29.  
  30. `k  `2A few bumps later you arrive - ah, traveling in style is so much fun!
  31.  
  32.   `0"I bid you a goodday s&sir, please travel safely."
  33.  
  34.   `2Looks like you are on your own.
  35.  
  36. `k
  37. @if responce is 1 then do
  38.   @begin
  39.    ;Sosen village
  40.    @do x is 38
  41.    @do y is 5
  42.    @do map is 456
  43.   @end
  44.  
  45. @if responce is 2 then do
  46.   @begin
  47.    ;Stonepass Lodge
  48.    @do x is 40
  49.    @do y is 11
  50.    @do map is 880
  51.   @end
  52.  
  53. @if responce is 3 then do
  54.   @begin
  55.    ;Porttown
  56.    @do x is 43
  57.    @do y is 16
  58.    @do map is 956
  59.   @end
  60.  
  61.  
  62.   @loadmap &map
  63.   @end
  64. @drawmap
  65. @update
  66.  
  67. @#HEALME
  68. ;free heal
  69. @offmap
  70. @do moveback
  71. @show
  72. `r0`c  `r1  The Healers  `r0
  73.  
  74.   `2The good doctor looks you over for wounds carefully.
  75.  
  76.   `%YOU ARE COMPLETEY HEALED.
  77.  
  78. `k
  79. @do `p02 is `p03
  80. @drawmap
  81. @update
  82.  
  83.  
  84. @#TOWER
  85. ;Tower in the castle
  86. @DO SAYBAR
  87. `2The tower on this castle is not ready yet.
  88. @do moveback
  89.  
  90. @#doorguard
  91. @do moveback
  92. @label startg
  93. ;guy who owns on it pushes against the door guard symbol.  This lets him
  94. ;control the password to gain entrance to the castle, as well as sell it
  95. ;back or transfer ownership.
  96. @if castle2.dat exist false then do
  97.   @begin
  98.   @do saybar
  99. `0"You have 5 minutes to vacate this castle!" `2the guard barks.
  100.   @closescript
  101.   @end
  102.  
  103. @readfile castle2.dat
  104. `p20
  105. `s01
  106. @
  107. ;load owner and current password
  108.  
  109. @if `p20 not &playernum then do
  110.   @begin
  111.   @do saybar
  112. You wave to the door guard, nice of him to let you in.
  113.   @closescript
  114.   @end
  115. @busy
  116.  
  117.  
  118. @do `v01 is 1 ;set default choice to 1
  119. @show
  120. `r0`c  `r1 Instructing your servants `r0
  121.  
  122.   `2The huge doorguard snaps to attention when he sees you are going to
  123.   address him.
  124.  
  125. @do write
  126. `x`x
  127. @choice
  128. Set password to gain entrance (currently is `0`s01`%)
  129. Ownership options
  130. Leave
  131. @
  132. @if responce is 2 then do
  133.  @begin
  134.  @show
  135. `r0`c  `r1 Ownership Options `r0
  136.  
  137.   `2You retrieve your deed and carefully look it over.
  138.    
  139.    @do `v01 is 1
  140.    @do write
  141. `x`x
  142.    @choice
  143. Transfer deed to someone else
  144. Sell property back to the bank for `$10000`%.
  145. Do nothing of the sort
  146.  @if response is 1 then do
  147.    @begin
  148.    @show
  149. `\`\  `2Transfer to whom?
  150.    @chooseplayer `p20
  151.  
  152.    @if `p20 is 0 then do
  153.     @begin
  154.     @show
  155.   `2You decide to keep your domain - for now.`\`\`k
  156.     @do goto startg
  157.     @end
  158.    @do `s02 is getname `p20
  159.    @show
  160. `2  Are you sure you wish to give your castle to `0`s02`2?
  161. @do write
  162. `x`x
  163. @choice
  164. Yes
  165. Not on your life.
  166.  @if responce is 2 then do
  167.    @begin
  168.     @show
  169. `\`\  `2You decide to keep your domain - for now.`\`\`k
  170.     @do goto startg
  171.    @end
  172.  
  173.   @do delete castle2.dat
  174.   @writefile castle2.dat
  175. `p20
  176. `s01
  177. 0
  178. 0
  179. 0
  180. 0
  181.    @writefile mail\mail`p20.dat
  182.   `0Business note:
  183. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  184. `0  `n`2 has transferred ownership of Castle Coldrake to you. 
  185.   Password to enter will remain `0"`s01"`2 unless
  186.   `2you come by and change it.
  187.  
  188.     @do addlog
  189.   `0`n`2 has given `%Castle Coldrake`2 to `0`s02`2!
  190.      @routine seperate in gametxt.ref
  191.  
  192.     @show
  193. `\`\  `2Deed transfered.  Oh well - it was fun while it lasted.`\`\`k
  194.    @do goto done
  195.    @end
  196.   @if response is 2 then do
  197.     @begin
  198.     @show
  199. `\`\`2  Are you sure you wish to sell your castle back to the bank?`\
  200. @do `v01 is 1
  201. @do write
  202. `x`x
  203. @choice
  204. Yes
  205. Not on your life.
  206.  @if responce is 2 then do
  207.    @begin
  208.     @show
  209. `\`\  `2You decide to keep your domain - for now.`\`\`k
  210.     @do goto startg
  211.    @end
  212.  
  213.   @do delete castle2.dat
  214.   @do money + 10000
  215.   @show
  216. `\`\  `%CASTLE SOLD!`2`\`\`k
  217.     @do addlog
  218.   `0`n`2 has sold `%Castle Coldrake`2 back to the bank!
  219.     @routine seperate in gametxt.ref
  220.     @do goto done
  221.     @end
  222.  
  223.  
  224.   @do goto startg
  225.  @end
  226.  
  227. @if responce is 1 then do
  228.   @begin
  229.   @do write
  230. `\`\  `0"And the new password, s&sir?" `2(enter `4NONE`2 for no access to anyone)`\  `2Password:`x
  231.   @do readstring 40 `s01 `s01 
  232.   @do `p20 is length `s01
  233.   @if `p20 < 2 then do
  234.    @begin
  235.    @show
  236. `\`\  `2You decide the current password is ok.`\`\`k
  237.    @do goto startg
  238.    @end
  239.   @do delete castle2.dat
  240.   @writefile castle2.dat
  241. &playernum
  242. `s01
  243. 0
  244. 0
  245. 0
  246. 0
  247. @show
  248. `\`\  `0"Yes s&sir, I will not forget it!" `2the guard promises.`\`\`k
  249.    @do goto startg
  250.   @end
  251.  
  252. @drawmap
  253. @update
  254.  
  255. @#sign
  256. @do moveback
  257.  
  258.  @if castle2.dat exist false then do
  259.  @begin
  260.  @do saybar
  261. Castle Coldrake - For sale cheap, enquire inside.
  262.  @end 
  263.  
  264. @if castle2.dat exist true then do
  265.  @begin
  266. @readfile castle2.dat
  267. `p20
  268. `s01
  269. @
  270. @do `s01 is getname `p20
  271.  @do saybar
  272. `2Property of `0`s01`2.
  273.  @end 
  274.  
  275. @#enter
  276. @do moveback
  277. @offmap
  278. @if castle2.dat exist false then do
  279.   @begin
  280.   @show
  281. `r0`c  `r1 `%For Sale `r0
  282.  
  283.   `2Castle Coldrake was once a magnificient structure that housed many of
  284.   the royal families.
  285.  
  286.   Buy now and recieve the following bonuses:
  287.  
  288.   `0* `2A private carriage service!  With drop off points in `0Porttown`2
  289.     and `0Sosen Village`2!
  290.  
  291.   `0* `2Your very own physician on the grounds!
  292.  
  293.   `2The asking price is `$$20,000`2.
  294.  
  295. @do `v01 is 1
  296. @do write
  297. `x`x
  298. @choice
  299. >&money 19999 Purchase it.
  300. <&money 20000 Sigh wistfully and leave since you don't have enough.
  301. >&money 19999 Leave.
  302. @
  303.  
  304. @if responce is 1 then do
  305.   @begin
  306.   @if castle2.dat exist true then do
  307.     @begin
  308.     @show
  309. `\`\  `2Oh crap!  Someone bought it while you were thinking about it.  You
  310.   will regret your snail like thinking for the rest of your days.`\`\`k
  311.     @do goto done
  312.     @end
  313.  
  314.   @writefile castle2.dat
  315. &playernum
  316. NONE
  317. 0
  318. 0
  319. 0
  320. 0
  321.     @do money - 20000
  322.     @do addlog
  323.   `0`n `2buys `%Castle Coldrake`2!
  324.      @routine seperate in gametxt.ref
  325.  
  326.   @show
  327. `r0`c  `r1 `%Why hello there, landowner! `r0
  328. `\`2  Nice job!  You now own this castle!
  329.  
  330.   `2Enjoy your new home.`\`\`k
  331.   @end
  332.  
  333. @label done
  334. @drawmap
  335. @update
  336. @closescript
  337.   @end
  338.  
  339. @readfile castle2.dat
  340. `p20
  341. `s01
  342. @
  343.  
  344. @do `p21 is deleted `p20
  345.  
  346. @if `p21 is 1 then do
  347.   @begin
  348.    ;owner got deleted!!!  Lets put it up for sale again.
  349.    @do delete castle2.dat
  350.     @do addlog
  351.   `%Castle Coldrake`2 is put on the market today.
  352.      @routine seperate in gametxt.ref
  353.  
  354.    ;run script again
  355.    @do goto enter
  356.   @end
  357.  
  358. @if `p20 not &playernum then do
  359.   @begin
  360.   @do `s02 is getname `p20
  361.   @do upcase `s01
  362.   @if `s01 is NONE then do
  363.    @begin
  364.    @show
  365. `r0`c  `r1 None shall pass `r0
  366.  
  367.   `2You pound on the door for some time before you get an answer.
  368.  
  369.   `0"Master `s02`0 has declared that `4NO`0 visitors shall be allowed!" `2a
  370.   voice calls from behind the wall.
  371.  
  372.   `4Ouch!
  373.  
  374. `k
  375.    @do goto done
  376.    @end
  377.  
  378.   @show
  379. `r0`c  `r1 Stand and unfold thyself `r0
  380.  
  381. `2  A head pops over the gate.  `0"Halt, you!  What business have you with
  382.   my lord and master, `%`s02`0?" `2the door guard asks.
  383.  
  384. @do write
  385. `x`x
  386. @do `v01 is 1
  387. @choice
  388. Offer an explanation.
  389. Visit later.
  390.   @if response is 1 then do
  391.    @begin
  392.    @do write
  393. `\`\  `2Say what? :`x
  394.   @do readstring 40 NIL `s03 
  395.   @do upcase `s03
  396.   @do upcase `s01
  397.  
  398.   @if `s03 is `s01 then do
  399.     @begin
  400.     @show
  401. `\`\  `0"Welcome to `%Castle Coldrake`0,"`2 the guard smiles as he opens the gate.`\`\`k
  402.     @do goto letmein
  403.     @end
  404.    @writefile mail\mail`p20.dat
  405.   `0Castle Coldrake Reports:
  406. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  407. `0  `n`2 attempted to sweet talk the guard by saying
  408.   `0"`s03"`2.  `2He was `bNOT`2 allowed in.
  409.  
  410.    @show
  411. `\`\  `2The guard doesn't look too interested.`\`\`k
  412.    @do goto done
  413.    @end
  414.  
  415.   @do goto done
  416.  
  417.   @end
  418.  
  419. ;let him in
  420. @label letmein
  421. @do x is 41
  422. @do y is 17
  423. @do map is 80
  424. @loadmap 80
  425. @do goto done
  426. @#done
  427.